﻿Public Class TestingForm
    Dim dbGL As New dbGL
    Dim dsGL As New DataSet

    Private Sub TestingForm_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        dsGL = dbGL.ListMasterChartOfAccount("= GLAC_LEVEL")
        AdvTextbox1.Visible = False
        AdvTextbox1.Initialize(dsGL, "GL Account ID", TextBox2)
        Dim col As New DataGridViewDatePickerColumn()
        DataGridView1.Columns.Add(col)
        DataGridView1.Rows.Add(2)
        DataGridView1.Columns(0).HeaderText = "testing"
    End Sub

    Private Sub TextBox2_DoubleClick(sender As Object, e As EventArgs) Handles TextBox2.DoubleClick, TextBox1.DoubleClick
        AdvTextbox1.Visible = True
        AdvTextbox1.BringToFront()
        AdvTextbox1._Show()
    End Sub

    Private Sub TextBox2_TextChanged(sender As Object, e As EventArgs) Handles TextBox2.TextChanged
        AdvTextbox1.Visible = False
        If (TextBox2.Text = "load") Then
            TextBox2.Text = AdvTextbox1.dsResult.Tables(0).Rows(0)("GL Account ID").ToString()
            TextBox1.Text = AdvTextbox1.dsResult.Tables(0).Rows(0)("GL Account Name").ToString()
        End If
    End Sub
End Class